set(LSW_DRV_LIB l_lsw_drv)
 
file(GLOB_RECURSE SOURCES "*.h" "*.c")
add_library(${LSW_DRV_LIB} SHARED ${SOURCES})

target_include_directories(${LSW_DRV_LIB}
    PUBLIC ${LUACLIB_SRC_DIR}
    PUBLIC ${CONAN_INCLUDE_DIRS}
    PUBLIC ${GLIB_INCLUDE_DIRS}
)

target_link_libraries(${LSW_DRV_LIB}
    PUBLIC ${CONAN_LIBS_HUAWEI_SECURE_C}
    PUBLIC ${GLIB2_LIBRARIES}
    PUBLIC ${GMODULE_LIBRARIES}
    PUBLIC cutils
    PUBLIC logging
    PUBLIC lsw_drv
)
# 设置生成的so文件名为lsw_drv.so
set_target_properties(${LSW_DRV_LIB} PROPERTIES OUTPUT_NAME "lsw_drv")
set_target_properties(${LSW_DRV_LIB} PROPERTIES PREFIX "")
install(TARGETS ${LSW_DRV_LIB} DESTINATION opt/bmc/luaclib)